/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007-2008 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.basics.bean.impl;

import com.genia.toolbox.basics.bean.MutableCsvConfiguration;

/**
 * implementation of {@link MutableCsvConfiguration}.
 */
public class CsvConfigurationImpl
    implements MutableCsvConfiguration
{

  /**
   * the character to start comments wiht.
   */
  private Character commentDelimiter = '#';

  /**
   * the type of Csv to handle.
   */
  private CsvType cvsType = CsvType.EXCEL;

  /**
   * the character to delimit beetween columns.
   */
  private char delimiter = ';';

  /**
   * the encoding of the Csv file. If no encoding is specified, one will first
   * try utf-8 and then latin1.
   */
  private String encoding = null;



  /**
   * getter for the commentDelimiter property.
   * 
   * @return the commentDelimiter
   */
  public Character getCommentDelimiter()
  {
    return commentDelimiter;
  }



  /**
   * getter for the cvsType property.
   * 
   * @return the cvsType
   */
  public CsvType getCvsType()
  {
    return cvsType;
  }



  /**
   * getter for the delimiter property.
   * 
   * @return the delimiter
   */
  public char getDelimiter()
  {
    return delimiter;
  }



  /**
   * getter for the encoding property.
   * 
   * @return the encoding
   */
  public String getEncoding()
  {
    return encoding;
  }



  /**
   * setter for the commentDelimiter property.
   * 
   * @param commentDelimiter
   *          the commentDelimiter to set
   */
  public void setCommentDelimiter(Character commentDelimiter)
  {
    this.commentDelimiter = commentDelimiter;
  }



  /**
   * setter for the cvsType property.
   * 
   * @param cvsType
   *          the cvsType to set
   */
  public void setCvsType(CsvType cvsType)
  {
    this.cvsType = cvsType;
  }



  /**
   * setter for the delimiter property.
   * 
   * @param delimiter
   *          the delimiter to set
   */
  public void setDelimiter(char delimiter)
  {
    this.delimiter = delimiter;
  }



  /**
   * setter for the encoding property.
   * 
   * @param encoding
   *          the encoding to set
   */
  public void setEncoding(String encoding)
  {
    this.encoding = encoding;
  }
}
